home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_348 / samp / aboutsamp < prev    next >
Text File  |  1992-05-06  |  5KB  |  102 lines

  1. SAMP is an IFF sampled sound format designed for professional music use. It
  2. has none of the limitations of 8SVX (i.e. can be used for 16-bit samples,
  3. multiple waveforms, etc.)  It is also more practical and powerful than AIFF
  4. or Sound Designer formats.  The SAMP spec can be obtained on Fish disk #307,
  5. or from CATS (ATTN: Darius Taghavy) if you're a registered developer, or from
  6. dissidents.  There is a SAMP reader/writer library to make adding SAMP support
  7. a painless endeavor, plus programming examples.  There is also a conversion
  8. utility to convert 8SVX to SAMP.  These tools may be freely distributed with
  9. any product.  For these reasons, several developers who are in the process of
  10. making 16-bit playback hardware for the Amiga will be utilizing SAMP in their
  11. developer's packets.  Of course, 8SVX cannot be supported in any 16-bit product
  12. since 8SVX has no facility for distinguishing the number of significant bits.
  13. THEREFORE, IF YOU WISH TO BE ABLE TO USE ANY FORTHCOMING 16-BIT AUDIO HARDWARE
  14. FOR THE AMIGA, YOU CANNOT USE 8SVX.  Since these hardware manufacturers have
  15. agreed to utilize SAMP, it might be worthwhile for you to do so as well.
  16.    On this disk is a new library that deals with the SAMP InstrumentType byte.
  17. A whole library for 1 byte of a data file???  Well, yes.  This is because the
  18. user must set the InstrumentType byte, and to do so, he must be allowed to
  19. choose from dozens of instruments (i.e. strings).  Having a library that
  20. presents the strings to the user in a friendly manner, and obtains his choice
  21. frees an application from having all those strings permanently imbedded in the
  22. program.  You open the library, get the user's choice, and close the library.
  23. The library uses the dissidents FileIO requester.library, so it would be ad-
  24. vantageous for your program to also use this fine I/O requester. It works like
  25. so:
  26.  
  27.   1).  The 11 Families of instruments are presented to the user using the
  28.        requester.library.  These Families are String, Keyboard, Guitar, Drum,
  29.        etc. (See SAMP doc).  There is a gadget labelled "Class".
  30.  
  31.   2).  The user clicks on the Family from which he will choose the instrument.
  32.        For example, he might click on "Drum" if his sample is of a Snare drum.
  33.  
  34.   3).  The user then clicks on the "Class" gadget to reveal the instruments of
  35.        the selected Family.  For our example, the Drum Family would be dis-
  36.        played (i.e. Snare, Kick, Tom, etc).  The "Class" gadget turns into a
  37.        "Family" gadget in case the user wishes to return to the list of
  38.        families. (See Step 1)
  39.  
  40.   4).  The user double-clicks on his choice, or types in the desired instrument
  41.        name.  For our example, he might click on "Snare" and then select the
  42.        OK gadget.  This would return the SAMP InstrumentType byte for a snare
  43.        drum.
  44.  
  45.    Here is the lib routine that does this:
  46.  
  47. ******************************************************************************
  48.  
  49. SYNOPSIS
  50.     instype = GetInsType( screenptr );
  51.        d0                     a1
  52.  
  53. FUNCTION
  54.     Presents a requester to the user, and obtains his choice of SAMP Instru-
  55. mentType.
  56.  
  57. INPUTS
  58.     The screen upon which the requester is to open, or NULL if workbench
  59.  
  60. OUTPUTS
  61.     Returns the SAMP InstrumentType byte if successful. Otherwise, returns
  62. these errors:
  63.  
  64.   1)  -1 if the requester couldn't open (out of memory)
  65.   2)  -2 if user cancelled via the CANCEL button
  66.   3)  -3 if library in use (only 1 application at a time can have the req open)
  67.  
  68. NOTE
  69.     This function returns a LONG, but the SAMP InstrumentType is defined as a
  70. UBYTE.  You should recast the returned value after you check for errors. Note
  71. that if the user types in a Family or Class which doesn't exist, or doesn't
  72. make a selection, the returned InstrumentType will be Unknown (i.e. 0x00).
  73. Also, note that if a user selects only a Family (and no instrument within a
  74. Family) the low nibble of the InstrumentType will be 0 and the high nibble
  75. will be the Family.  In this way, the user can classify a sample in very
  76. general terms if desired (i.e. a Woodwind) as opposed to specific terms (i.e.
  77. a Clarinet).
  78.  
  79.  
  80.     There is a second routine in the library which takes a SAMP InstrumentType
  81. byte and returns a null-terminated string to describe it.  Use this function
  82. to turn InstrumentType bytes into something the user can relate to.
  83.  
  84. *****************************************************************************
  85.  
  86. SYNOPSIS
  87.     string = GetInsString( instype );
  88.        d0                     d0
  89.  
  90. FUNCTION
  91.     Returns a null-terminated string which describes the SAMP IstrumentType.
  92.  
  93. INPUTS
  94.     A SAMP InstrumentType byte (see SAMP doc)
  95.  
  96. OUTPUTS
  97.     Returns a pointer to a null-terminated string
  98.  
  99. NOTE
  100.     This function will return a pointer to "Unknown" if a currently undefined
  101. SAMP InstrumentType byte is passed.
  102.